<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap 101 Template</title>
    <link href="{{asset('css/bootstrap.min.css')}}" rel="stylesheet">
    <link href="{{asset('css/writer/writer.css')}}" rel="stylesheet">
    <script src="{{ URL::asset('js/jquery-2.1.4.min.js')}}"></script>
    <script src="{{asset('js/bootstrap.min.js')}}"></script>
    <style>
        body{
            margin: 0;
            padding: 0;
            /*background-color: grey;*/
        }
    </style>
</head>
<body>
@section('index')
    <div class="container">
        <div class="row works">
            <div class="col-md-12">作品管理</div>
        </div>

        <div class="row noe">
            <div class="col-md-6">
                <div class="">当期作品总数</div>
            </div>

            <div class="col-md=6">
                <div class="found">
                    <a href="{{url('linfeng/writer/book/add')}}" class="btn btn-primary">创建作品</a>
                </div>
            </div>
        </div>

        {{--主体--}}
        <div class="row">
            @section('main')
                <div class="row">
                    {{--标题栏--}}
                    <div class="col-md-12 title">
                        <div class="titleul">
                        <ul>
                            <li>书名</li>
                            <li>最新章节</li>
                            <li>分类</li>
                            <li>章节数</li>
                            <li>创建时间</li>
                            <li>操作</li>
                        </ul>
                        </div>
                    </div>
                </div>

                <div class="row">

                    @if($jg)
                    @foreach($jg as $k)

                    <div class="col-md-12" >
                        <div class="details">
                        <ul>
                            <li>
                                {{--<img src="C:\wamp\www\laravel\public\image\books\20.jpg" alt="">--}}
                                <img src="{{asset('image/books/'.$k->bookicon)}}" alt="" class="img-thumbnail img">
                                {{$k->bookname}}
                            </li>

                            <li>
                                    1111
                            </li>

                            <li>
                                @if($k->cid==1)
                                    玄幻
                                @elseif($k->cid==2)
                                    科幻
                                @elseif($k->cid==3)
                                    都市
                                @elseif($k->cid==4)
                                    军事
                                @elseif($k->cid==5)
                                    末日
                                @elseif($k->cid==6)
                                    武侠
                                @elseif($k->cid==7)
                                    爱情
                                @endif
                            </li>

                            <li>
                                {{$k->chapterssum}}
                            </li>

                            <li>
                                {{date('Y-m-d',$k->addtime)}}
                            </li>

                            <li>
                                <a href="{{url('linfeng/writer/book/chapters/'.$k->id)}}">章节</a>
                            </li>

                        </ul>
                        </div>
                    </div>
                    @endforeach
                 </div>
                @endif

                @show
        </div>

    </div>
    @show

</body>
</html>